﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using EnvDTE80;
using Microsoft.TeamFoundation.VersionControl.Client;
using TeamReview.Services;

namespace WpfControlLibrary1.UI
{
    /// <summary>
    /// Interaction logic for ReviewReplayWindow.xaml
    /// </summary>
    public partial class ReviewReplayWindow : UserControl
    {
        private DTE2 shellDTE;

        public ReviewReplayWindow()
        {
            InitializeComponent();
        }
        private void GetVersionControl()
        {
            if (new  TFSServiceAccess().VersionControlExt != null)
            {
                //TODO SetTfsServer();
                //TODO SetResultGridEvents();
            }
            if (new TFSServiceAccess() .VersionControlServer != null)
            {
                //TODO TFSService.VersionControlServer.BeforeCheckinPendingChange +=                     new ProcessingChangeEventHandler(VersionControlServer_BeforeCheckinPendingChange);
                    //TODO TFSService.VersionControlServer.AfterWorkItemsUpdated +=                     new AfterWorkItemsUpdatedEventHandler(VersionControlServer_AfterWorkItemsUpdated);
            }
        }
        public DTE2 Shell
        {
            get { return shellDTE; }
            set
            {
                shellDTE = value;

                if (shellDTE.Solution == null)
                    return;

                if (shellDTE.Solution.FullName.Length > 0)
                {
                    GetVersionControl();
                }

                //TODO ReBind();
            }
        }
    }
}
